export default [
  {
    path: '/user',
    component: '../layouts/UserLayout',
    routes: [
      { path: '/user', redirect: '/user/login' },
      { path: '/user/login', component: './User/Login' },
      { path: '/user/register', component: './User/Register' },
      { path: '/user/register-result', component: './User/RegisterResult' },
    ],
  },
  // app
  {
    path: '/',
    component: '../layouts/BasicLayout',
    Routes: ['src/pages/Authorized'],
    // authority: ['admin'],
    routes: [
      { path: '/', redirect: '/vehicleManage/monitorVehicle' },
      // 系统设置
      {
        name: '系统设置',
        icon: 'appstore',
        path: '/systemSetting',
        routes: [
          {
            path: '/systemSetting/panes',
            name: '系统设置',
            component: './systemSetting/panes/panes',
          },
          {
            path: '/systemSetting/accountMenage',
            name: '账号管理',
            component: './systemSetting/accountMenage/accountMenage',
          },
          {
            // authority: ['guest'],
            path: '/systemSetting/roleManage',
            name: '角色管理',
            component: './systemSetting/roleManage/roleManage',
          },
          {
            path: '/systemSetting/funcConfig',
            name: '权限管理',
            component: './systemSetting/funcConfig/funcConfig',
          },
          {
            path: '/systemSetting/operationLog',
            name: '操作日志',
            component: './systemSetting/operationLog/operationLog',
          },
          {
            path: '/systemSetting/organizStructure',
            name: '组织架构',
            component: './systemSetting/organizStructure/organizStructure',
          },
        ],
      },
      // AppManage
      {
        name: '应用管理',
        icon: 'appstore',
        path: '/appManage',
        routes: [
          {
            path: '/appManage/appList',
            name: '应用列表',
            component: './appManage/appList/appList',
          },
        ],
      },
      // BMS
      {
        name: 'BMS设备管理',
        icon: 'appstore',
        path: '/equiManage',
        routes: [
          {
            path: '/equiManage/equiList',
            name: '设备列表',
            component: './equiManage/equiList/equiList',
          },
        ],
      },
      // OBD
      {
        name: '设备管理',
        icon: 'appstore',
        path: '/obdManage',
        routes: [
          {
            path: '/obdManage/terminalEquipment',
            name: '终端设备管理',
            component: './obdManage/terminalEquipment/terminalEquipment',
          },
          {
            path: '/obdManage/otaUpdata',
            name: '终端远程升级',
            component: './obdManage/otaUpdata/otaUpdata',
          },
          {
            path: '/obdManage/otaConfig',
            name: '终端远程配置',
            component: './obdManage/otaConfig/otaConfig',
          },
          {
            path: '/obdManage/simManage',
            name: 'SIM卡管理',
            component: './obdManage/simManage/simManage',
          },
          {
            path: '/obdManage/panes',
            name: '设备管理',
            component: './obdManage/panes/panes',
          },
        ],
      },
      // 报警
      {
        name: '报警管理',
        icon: 'appstore',
        path: '/warnManage',
        routes: [
          {
            path: '/warnManage/warnList',
            name: '报警查询',
            component: './warnManage/warnList/warnList',
          },
          {
            path: '/warnManage/driveAnalyze',
            name: '驾驶行为分析',
            component: './warnManage/driveAnalyze/driveAnalyze',
          },
        ],
      },
      // 规则管理
      {
        name: '规则管理',
        icon: 'appstore',
        path: '/ruleConfig',
        routes: [
          {
            path: '/ruleConfig/ruleList',
            name: '规则配置',
            component: './ruleConfig/ruleList/ruleList',
          }
        ],
      },
      // 车辆监控
      {
        name: '车辆管理',
        icon: 'appstore',
        path: '/vehicleManage',
        routes: [
          {
            path: '/vehicleManage/monitorVehicle',
            name: '车辆监控',
            component: './vehicleManage/monitorVehicle/monitorVehicle',
          },
          {
            path: '/vehicleManage/terminalManage',
            name: '车辆管理',
            component: './vehicleManage/terminalManage/terminalManage',
          },
        ],
      },
      // 司机管理
      {
        name: '司机管理',
        icon: 'appstore',
        path: '/driver',
        routes: [
          {
            path: '/driver/driverInformation',
            name: '司机信息',
            component: './driver/driverInformation/driverInformation',
          },
        ],
      },
      {
        path: '/exception',
        routes: [
          {
            path: '/exception/welcome',
            name: 'not-permission',
            component: './Exception/hello',
          },
          {
            path: '/exception/403',
            name: 'not-permission',
            component: './Exception/403',
          },
          {
            path: '/exception/404',
            name: 'not-find',
            component: './Exception/404',
          },
          {
            path: '/exception/500',
            name: 'server-error',
            component: './Exception/500',
          },
          {
            path: '/exception/trigger',
            name: 'trigger',
            hideInMenu: true,
            component: './Exception/TriggerException',
          },
        ],
      },
      {
        component: '404',
      },
    ],
  },
];
